<?
session_start();

include_once("class.lib/db.class.php");
include_once("class.lib/user.class.php");
//include_once("class.lib/diplome.class.php");
//include_once("class.lib/cours.class.php");
include_once("class.lib/domaine.class.php");
include_once("class.lib/mention.class.php");
include_once("class.lib/aa_niveau.class.php");
include_once("class.lib/aa_projet.class.php");

$cin=$_SESSION["cin"];





if($cin=="") { header("Location: ../index.php");   }
/*
if(!isset($_SESSION['step'])) $_SESSION['step']='1';
else
{

//$_SESSION["code"]
	if($_SESSION['code']!='')
	{
	if($_SESSION['step']=='2' ) { 
	echo "<script language=\"JavaScript\"> document.location=\"partenaires.php?id_ue=".$_SESSION['code']."\"; </script>;";
	//header("Location: partenaires.php?id_ue=".$_SESSION['code']); 
	}
	else if($_SESSION['step']=='3' )  { 
	//header("Location: equipe.php?id_ue=".$_SESSION['code']); 
	echo "<script language=\"JavaScript\"> document.location=\"equipe.php?id_ue=".$_SESSION['code']."\"; </script>;";
	}
	else if ($_SESSION['step']=='4' )  { 
	header("Location: confirmation.php");
	echo "<script language=\"JavaScript\"> document.location=\"confirmation.php\"; </script>;";
	}
	}
}*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Soumisison du cours</title>



<script language="JavaScript">
//PLF-http://www.jejavascript.net/
function OuvrirPop(url,nom,haut,Gauche,largeur,hauteur,options) {
ouvpop=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}
</script>
<script type="text/javascript" src="javascript.js"></script>
<link href="presse.css" rel="stylesheet" type="text/css" />

<script src="scriptaculous/lib/prototype.js" type="text/javascript"></script>
<script src="scriptaculous/src/effects.js" type="text/javascript"></script>
<script type="text/javascript" src="fabtabulous.js"></script>
<script type="text/javascript" src="validation.js"></script>
</head>
<body >




	<table align="center">
	 <tr align="center"><td><img src="images/diploma.png"  width="72" height="72" /></td>
	 <td align="right"><H1><font color="DD0269">DESCRIPTION DE LA FORMATION  PROJETEE (suite)</font></H1><br/></td>
	 </tr>
	</table>
	
<table width="90" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr> 
   
   
    <td><img src="images/etape2_on.jpg" width="90" height="20" /></td>
    <td><img src="images/etape3_off.jpg" width="90" height="20" /></td>
	<td><img src="images/etape4_off.jpg" width="90" height="20" /></td>
	<td>&nbsp;</td>
  </tr>
</table>
<u>
<H1>&nbsp; </H1>
</u> 
<table width="500" border="0" cellspacing="0" cellpadding="0" align="center" >
    <tr> 
      <td align="left"> <p><strong><font color="DD0269">NB</font></strong>: Veuillez 
        v&eacute;rifier toutes les informations avant de valider le formulaire.<br />
        <br />
      </p>
      </td>
    </tr>
    <tr> 
      
    <td align="left">&nbsp; </td>
    </tr>
    <tr>
      <td> 
        <table width="700" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr align="left"> 
          <td height="0" valign="top"><em><font color="#277BB0"><strong> </strong></font></em> 

        <form name="cours" id="cours" method="post" action="" >
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <!--<tr align="left"> 
                  <td colspan="3"> <strong><img src="images/navi_arerow.gif" width="6" height="21" align="absmiddle" /> 
                    Fiche signal&eacute;tique de projet de formation</strong></td>
                </tr>
				-->
                <tr valign="top" bgcolor="#345491"> 
                  <td colspan="3"><img src="images/gif/pix.gif" width="1" height="1"></td>
                </tr> 
				
				<tr align="left"> 
				 <!-- <td height="25">
				  <a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("public.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                  </td>
				  -->
				   <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("public.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span> Public cible: </td>
                  <td height="25" width="5">:</td>
		
                  <td height="0" class="required_info"><textarea  cols="43" rows="2"  name="public_cible" type="text" id="public_cible"  class="required" title="Veuillez entrer le public cible SVP!!" ></textarea></td>
                </tr>
				
				<tr align="left"> 
           
			 		   <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("objectif.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span>  Objectifs de la formation </td>
                  <td height="25" width="5">:</td>
				  
                  <td height="0"  class="required_info"><textarea name="objectif" cols="43" rows="2" id="objectif" class="required"  title="Veuillez entrer les objectifs SVP!!"></textarea></td>
                </tr>
				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>Profil du m&eacute;tier vis&eacute; par la formation :</td>
                  <td height="25">:</td>
                  <td height="25" class="required_info"><textarea name="discipline" cols="43" rows="2" id="discipline" class="required" title="Veuillez entrer le profil vis&eacute; SVP!!"></textarea></td>
                </tr>
				
				
				<tr align="left"> 
          				  
				  <td height="25" align="left"><span class="Style5"> 
					<a href="#"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" onclick='OuvrirPop("contexte.html","fencent",10,10,420,380,"menubar=no,scrollbars=no,statusbar=no")' /></a> 
                    <font color="DD0269">*</font></span> Contexte du projet</td>
                  <td height="25" width="5">:</td>
				  
				  
                  <td height="25" class="required_info"><textarea name="description" cols="43" rows="2" id="description" class="required" title="Veuillez entrer le contexte du projet SVP!!"></textarea></td>
                </tr>
				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>Pourquoi avez-vous d&eacute;cid&eacute; de proposer cette formation &aagrave; distance ?</td>
                  <td height="25">:</td>
                  <td height="25" ><textarea name="cause" cols="43" rows="2" id="cause"  title="Pourquoi avez-vous d&eacute;cid&eacute; de proposer cette formation &acute; distance ?"></textarea></td>
                </tr>

				
				<tr align="left"> 
                  <td height="25"><font color="DD0269">*</font>
				  Cette formation, est-elle dispens&eacute;e en pr&eacute;sentiel dans votre &eacute;tablissement ou dans d'autres &eacute;tablissements universitaires? </td>
                  <td height="25">:</td>
                  <td height="25" >
					<div>Oui<input type="radio" class="inforadio" id="oui" name="depense" value="1" label="Oui" onclick="$('depense_etablissementv').show()"  />
					<span id="depense_etablissementv" style="display:none;" >
						Si Oui pr&eacute;cisez l'intitul&eacute; et l'&eacute;tablissement  habilit&eacute; 
						<textarea id="depense_etablissement" rows="2" cols="43" name="depense_etablissement" value="" ></textarea>
						</span>
					</div>
					<div> Non<input type="radio" id="non"  class="inforadio"  name="depense" value="0" label="Non" onclick="$('depense_etablissementv').hide()"  /></div>
				  </td>
				  
                </tr>

				
				
				
					
				<!--<tr align="left"> 
                  <td height="25">Mots cl&eacute;s:</td>
                  <td width="5" height="0">&nbsp;</td>
                  <td height="0"><input name="mots_cles" type="text" id="mots_cles" /></td>
                </tr>
			    -->
                <!--<tr align="left"> 
                  <td height="25"> 
                    Pr&eacute;-requis:</td>
                  <td width="5" height="25">&nbsp;</td>
                  <td height="25"><input name="nature" type="text" id="nature" /></td>
                </tr>
				-->

               
                <tr align="left"> 
                  <td height="25">&nbsp;</td>
                  <td height="25">&nbsp;</td>
                  <td height="25"><input name="addindexation" type="hidden" id="addindexation" value="OK" />                  </td>
                </tr>
                <tr> 
                  <td height="25" align="left">&nbsp;</td>
                  <td height="25">&nbsp;</td>
                  <td height="25" align="left"> <input type="reset" name="Submit22" value="R&eacute;tablir" class="button" /> 
                    <input type="submit" name="Submit3" value="Continuer &raquo;" class="button" />                  </td>
                </tr>
              </table>
            </form>
       <script type="text/javascript">
		 var valid2 = new Validation('cours', {useTitles:true});
	  </script>
      </td>
    </tr>
    <tr>
	
      
    <td align="left">&nbsp;</td>
    </tr>
  </table>
  </td>
    </tr>
</table>
<!--/td></tr>
</table-->

<p> 
  <?
 if(isset($_POST["addindexation"]))
    {
	  
	 $ue_tab["titre"]               =   "";//$_POST[""];
	 
	 $ue_tab["public_cible"]        =   $_POST["public_cible"];
	 $ue_tab["objectif"]            =   $_POST["objectif"];
     $ue_tab["discipline"]          =   $_POST["discipline"];
     $ue_tab["description"]         =   $_POST["description"];
     $ue_tab["cause"]         		=   $_POST["cause"];
	 $ue_tab["depense"]         	=   $_POST["depense"];
	 
	 $ue_tab["date_creation"]       =   date('a-m-d');//$_POST[""];
     
	 if($_POST['depense']=='1')
	 {
	 	 $ue_tab["depense_etablissement"]  =  $ue_tab["depense_etablissement"];
	 }
	 else
	  $ue_tab["depense_etablissement"] ="";
     
    
     
	 
	 
	  $ue_tab["nature"]              =   "";//$_POST[""];
	  $ue_tab["mots_cles"]           =   "";//$_POST[""];
	  
	  
	
	// R�cup�ation de l'id du cours en quesition
	 $projet = new Projet();
	 $id_ue = $projet->lastid();
	  $code_ue=$id_ue;
	 $ue_tab["code_ue"]             =   $id_ue;
	 
	 
	 
	 
	/* 
	  $user = new User();
	   //$id_responsable  = $user->getResponsableUe(session_id());     
	   $tab_ens["cin"]= $_SESSION["cin"];
	   $tab_ens["code_ue"]=$code_ue;
	   $tab_ens["role"]="Responsable";
	      $ensUe = $user->ensUe($tab_ens);*/
	// Ajout de l'indexation
	$res  = $projet->projetAssignIndexation($ue_tab);
	
	
	// Incr�menter l'Etape
	$_SESSION["etape"] = "confirmation";
	$_SESSION['step']='2';
	// On actualise la page
	echo "<script language=\"JavaScript\"> document.location=\"partenaires.php?id_ue=$id_ue\"; </script>;";
	} 

  
?>
</p>
</body>
</html>
